package com.coder4j.starter.web.jwt;

/**
 * Token处理异常
 * @author Keller
 * @date 2021-08-12 19:30:06
 */
public class TokenException extends Exception{
    public TokenException(String message){
        super(message);
    }

    public static TokenException NoKey(){
        return new TokenException("密钥缺失");
    }
    public static TokenException Invalid(){
        return new TokenException("Token已失效");
    }
    public static TokenException SignError(){
        return new TokenException("Token被篡改");
    }
    public static TokenException BuildFaied(){
        return new TokenException("Token构建失败");
    }
    public static TokenException ParseFailed(){
        return new TokenException("Token解析失败");
    }
}
